Please add some info about your setup, as requested in https://retropie.org.uk/forum/topic/3/read-this-first.
Mapping are usually created based on the controller/gamepad name, so even if the gamepad disconnects and then re-connects the configuration would still work. I'm not familiar with Arcade1Up inputs - are they using an USB encoder for both players or each player is a separate controller ?